package com.kingwang.training.designpattern.observer.bo.jdk.flow;

import java.util.concurrent.Flow;

public class EmailTaskSubscriber implements Flow.Subscriber<Task> {
    @Override
    public void onSubscribe(Flow.Subscription subscription) {
        System.out.println("注册成功");
    }

    @Override
    public void onError(Throwable throwable) {
        System.out.println("异常");
    }

    @Override
    public void onComplete() {
        System.out.println("消费完成");
    }

    @Override
    public void onNext(Task item) {
        System.out.println("变更产生");
    }
}
